<template>
	<view> 
		<ShopList :keyword="keyword"></ShopList>
	</view>
</template>

<script setup>
	import ShopList from '@/components/common/ShopList.vue'
	import {onLoad}from "@dcloudio/uni-app"
	import { ref} from 'vue'
	// 输入的内容
	const keyword = ref()
	onLoad((e)=>{
		keyword.value = e.keyword
		if(e.a){
			keyword.value = e.a
		}
		// app端动态改变输入框
				// #ifdef APP-PLUS 
				var webView = this.$mp.page.$getAppWebview();
				webView.setTitleNViewSearchInputText(e.keyword) 
				// #endif
		
		// H5端改变
		// #ifdef H5
			let inputSearch=document.querySelector('.uni-input-input[type=search]');
			var evt = new InputEvent('input', {
				inputType: 'insertText',
				data: keyword,
				dataTransfer: null,
				isComposing: false
			});
			if(inputSearch){
				inputSearch.value = keyword.value;
				inputSearch.dispatchEvent(evt);
			}
			// #endif
	})

</script>

<style scoped>

</style>
